<div class="container" ng-cloak >
    <div class="engine-biaod">
        <form class="form-inline" name="RuleVariableForm"g-validator="RuleVariable_Save"   data-invalid-msg="tooltipMessenger">
            <input type="hidden" name="id"  ng-model="variable.id"/>
            <input type="hidden" name="scopeId"  ng-model="variable.scopeId"/>
            <div class="form-group">
                <div class="attribute-form-group-l">变量名：</div>
                <div class="attribute-form-group-r">
                    <input type="text" name="varName" ng-model="variable.varName">
                </div>
                <div class="clear"></div>
            </div>
            <div class="form-group">
                <div class="attribute-form-group-l">类型：</div>
                <div class="attribute-form-group-r">
                    <select  name="valueType"  ng-model="variable.valueType">
                        <option value="0">数字</option>
                        <option value="1">字符串</option>
                        <option value="2">布尔型</option>
                        <option value="3">对象</option>
                    </select>
                </div>
                <div class="clear"></div>
            </div>
            <div class="form-group">
                <div class="attribute-form-group-l">表达式：</div>
                <div class="attribute-form-group-r">
                    <input type="text" name="varValueExpr" ng-model="variable.varValueExpr">
                </div>
                <div class="clear"></div>
            </div>

            <button type="button" class="engine-btn-default" ng-click="add()" pg-per="{{packageId}}|1" pg-sta="{{status}}|0"><i class="icon-engine-plus"></i>增加
            </button>

            <form  method="post" id="iconForm" enctype="multipart/form-data">
                <div style="font-size: 13px;padding-right: 10px"  class="engine-test-manage-r"><input type="button" ng-click="addFromJson()"  style="height: 20px"  pg-per="{{packageId}}|1" pg-sta="{{status}}|0" value="导入"/></div>
                <div style="font-size: 13px;" class="engine-test-manage-r"><input id="variableFile" type="file" style="height: 30px;width: 180px"  pg-per="{{packageId}}|1" pg-sta="{{status}}|0"/></div>
            </form>

        </form>
    </div>
    <table border="1" class="engine-table"  style="">
        <tr>
            <th>变量名</th>
            <th>类型</th>
            <th>表达式</th>
            <th>操作</th>
        </tr>
        <tr ng-repeat="variable in variables">
            <td>{{variable.varName}}</td>
            <td>{{variable.valueType| typeFilter}}</td>

            <td>{{variable.varValueExpr|varExprFilter}}</td>
            <td><a href="javascript:" ng-click="remove(variable)" pg-per="{{packageId}}|1" pg-sta="{{status}}|0">删除</a><a href="javascript:"
                                                                                                    ng-click="update(variable)"
                                                                                                    pg-per="{{packageId}}|1" pg-sta="{{status}}|o">修改</a>
            </td>
        </tr>
    </table>
</div>
